package com.onland.dfish.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.apache.ibatis.type.Alias;

import java.util.Date;

@Data
@Alias("history")
@TableName("t_history")
public class History {
    /**
     * 历史id
     */
    @TableId(type = IdType.AUTO)
    @TableField("id")
    private Integer id;
    /**
     * 视频id
     */
    @TableField(value = "video_id")
    private Integer videoId;
    /**
     * 用户id
     */
    @TableField(value = "user_id")
    private Integer userId;
    /**
     * 用户观看历史时间
     */
    @TableField(value = "add_time")
    private Date addTime;

    @Override
    public String toString() {
        return "History{" +
                "id=" + id +
                ", videoId=" + videoId +
                ", userId=" + userId +
                ", addTime=" + addTime +
                '}';
    }
}
